package cn.wx.scholar.core.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import cn.wx.common.persistence.base.BaseController;
import cn.wx.common.persistence.web.ResponseData;
import cn.wx.scholar.core.entity.Social;
import cn.wx.scholar.core.entity.qo.SocialQ;
import cn.wx.scholar.core.service.SocialService;
/**
 *   @description : Social 控制器
 *   ---------------------------------
 *   @author  
 *   @since 2018-07-17
 */
@RestController
@RequestMapping("/sholar/social")
public class SocialController extends BaseController {
	
	@Autowired
	private SocialService socialService;
	
    @RequestMapping(value = "/query/unique", method = RequestMethod.POST)
    public ResponseData queryUnique(@RequestParam(value="fId") Long fId) throws Exception {
    	SocialQ socialQ = new SocialQ();
    	socialQ.setfId(fId);
        return success(socialService.queryUnique(socialQ,Social.class));
    }
	
}